//
//
//
//
//
//
// ActiveObject.C

#include "ActiveObject.h"


ActiveObject::ActiveObject(){};
ActiveObject::~ActiveObject(){};

//
//
//
// create active thread here,
// it would finally call Svc methord 
// of inhericated class
void ActiveObject::Start()
{
	int nRet = pthread_create(&_threadID,
			NULL,
			ActiveObject::ThreadEntry,
			this);

}


void* ActiveObject::ThreadEntry(void* arg)
{
	ActiveObject* p = (ActiveObject*)arg;
	p->Svc();
	return NULL;
}

void ActiveObject::Wait(void)
{
	pthread_join(_threadID, NULL);
}
